package models

import (
	"fmt"
	"time"
)

var Models []interface{}

type DateTime time.Time

func (t DateTime) MarshalDateTime() ([]byte, error) {
	tTime := time.Time(t)
	return []byte(fmt.Sprintf("%v", tTime.Format("2006-01-02 15:04:05"))), nil
}

func (t DateTime) MarshalDate() ([]byte, error) {
	tTime := time.Time(t)
	return []byte(fmt.Sprintf("%v", tTime.Format("2006-01-02"))), nil
}
